package xyz.ddlnt.serviceusr.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import xyz.ddlnt.model.dto.UserContentInteractionDTO;
import xyz.ddlnt.model.entity.PrivateMessageList;
import xyz.ddlnt.model.vo.PrivateMessageListVO;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/26 16:50
 */
@Mapper
public interface PrivateMessageListMapper extends BaseMapper<PrivateMessageList> {

    @Select("select id, sender_status, message_version  from `private_message_list` where user_id = #{userId} and receiver_id = #{bloggerId}")
    PrivateMessageList getStatus(UserContentInteractionDTO userContentInteractionDTO);

    List<PrivateMessageListVO> selectPrivateMessage(IPage<PrivateMessageListVO> page, Long id);
}

